﻿using System.Collections.Generic;
using Gumini.JulaDB.DataTypes;

namespace Gumini.JulaDB.Expressions.Functions
{
    internal class CountFunction : AggregateFunction
    {
        public CountFunction()
            : base("count") { }

        public override object Evaluate(List<TypedValue> values)
        {
            return values.Count;
        }

        public override DataType GetReturnType()
        {
            return DataType.Number;
        }
    }
}
